<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>
	    
		<title><s:property value='%{getText("m_title")}' /></title>
		<link href="/SCMDB/style/SuperEdit.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="/SCMDB/js/Super.js"></script>
		<script type="text/javascript"
			src="/SCMDB/js/My97DatePicker/WdatePicker.js"></script>
		<%@ include file="../commonPage/message.jsp"%>

	</head>
	<body>
		<div class="main">
			<s:form action="empReportAction!findMonthReport" theme="simple"
				method="post">
				<fieldset class="fieldSearch">
					<legend>
						<s:property value='%{getText("m_legend")}' />
					</legend>
					<table width="100%">
						<tr>
							<td width="9%" align="right" class="p_8">
								<s:property value='%{getText("emp_new_xm")}' />
							</td>
							<td width="16%">
								<s:textfield name="empName" cssClass="sInput" />
							</td>
							<td width="8%" align="right" class="p_14">
								<s:property value='%{getText("emp_new_kh")}' />
							</td>
							<td width="17%">
								<s:textfield name="labelID" cssClass="sInput" />
							</td>
							<td width="8%" align="right" class="p_14">
								<s:property value='%{getText("emp_new_bm")}' />
							</td>
							<td width="16%">
								<s:select list="#session.depList" name="depID" listKey="id"
									listValue="deptName" headerKey="0" headerValue="--请选择--"></s:select>
							</td>
							<td width="26%">
							  
						    </td>
						</tr>
						<tr>
							<td width="9%" align="right" class="p_8">
								<s:property value='%{getText("emp_new_zw")}' />
							</td>
							<td>
								<s:select name="dutyID" list="#session.dutyList" listKey="id"
									listValue="name" headerKey="0" headerValue="--请选择--"></s:select>
							</td>
							<td align="right" class="p_14">
								<s:property value='%{getText("emp_new_gz")}' />
							</td>
							<td>
								<s:select name="workTypeID" list="#session.workTypeList"
									listKey="id" listValue="name" headerKey="0" headerValue="请选择"></s:select>
							</td>
							<td align="right" class="p_14">
								<s:property value='%{getText("emp_edit_sjfw")}' />
							</td>
							<td><s:textfield name="inTime" cssClass="timeShort"
									readonly="true" onfocus="WdatePicker({dateFmt:'yyyy-MM'})" /></td>
							<td><input type="button" id="bSearch" name="search" class="bSearch"
									value="查询" onclick="loading()" />
								<input type="button" id="excel" name="excel" class="bExcel"
									value="导出Excel"
									onclick="location.href='empReportAction!monthExcelReport.action'" /></td>
						</tr>
					</table>
				</fieldset>

				<table border="0" cellspacing="1" cellpadding="1" class="tableList">
					<thead>
						<tr>
							<th class="number">
								<s:property value='%{getText("emp_th1")}' />
							</th>
							<th >
								<s:property value='%{getText("emp_th2")}' />
							</th>
							<th>
								<s:property value='%{getText("emp_th3")}' />
							</th>
							<th>
								<s:property value='%{getText("emp_th5")}' />
							</th>
							<s:iterator id="day" status="u" value="#session.maxDay.keySet()">
								<th width="1%">
									${u.index+1}
								</th>
							</s:iterator>
							<th>
								<s:property value='%{getText("d_zongshu")}' />
							</th>
						</tr>
					</thead>
					<tbody>
						<s:iterator id="pageBean" value="#session.monthReportBean.list"
							status="u">
							<tr>
								<td class="number">
									${entity.index+u.index}
								</td>
								<td>
									${pageBean.labelID}
								</td>
								<td>
									${pageBean.empName}
								</td>
								<td>
									${pageBean.depName}
								</td>
								
								<s:iterator id="day" status="u" value="#session.maxDay.keySet()">
									<td>
										<s:if test="%{monthMap.get(#day)==null}">
										0
									</s:if>
										<s:else>
											<s:property value="monthMap.get(#day)" />
										</s:else>
									</td>
								</s:iterator>
								<td>
									${pageBean.totalWorkNum}
								</td>
							</tr>
						</s:iterator>
						<tr>
							<td colspan='<s:property value="#session.maxDay.size()+5"/>'
								class="turnPage">
								<jsp:include flush="true" page="../commonPage/page.jsp">
									<jsp:param name="entity" value="entity" />
								</jsp:include>
							</td>
						</tr>
					</tbody>
				</table>
			</s:form>
		</div>
		<div id="loading" style="display: none;"></div>
	</body>
</html>
